package cn.tedu.nybikeT.pojo;

import java.io.Serializable;

/**
 * 事故数据类
 * @author rory
 *
 */
public class CrashDO implements Serializable{

	private static final long serialVersionUID = -868223446072052811L;
	
	private String crashYear;//事故发生年份
	private String crashMonth;//事故发生月份
	private String crashDay;//事故发生天数
	//private String crashDate;//事故发生日期
	//private String crashTime;//事故发生时间
	private String latitude ;//发生纬度
	private String longitude ;//发生经度
	private String numberOfPersonsInjured ;//事故当事人受伤人数
	private String numberOfPersonsKilled ;//事故当事人死亡人数
	private String numberOfPedestriansInjured ;//行人受伤人数
	private String numberOfPedestriansKilled ;//行人死亡人数
	private String numberOfCyclistInjured ;//自行车手受伤人数
	private String numberOfCyclistKilled ;//自行车手死亡人数
	private String numberOfMotoristInjured ;//摩托车手受伤人数
	private String numberOfMotoristKilled ;//摩托车手死亡人数
	private String collisionId;//事故id
	
	public CrashDO() {
		super();
		// TODO Auto-generated constructor stub
	}

	public CrashDO(String crashYear, String crashMonth, String crashDay, String latitude, String longitude,
			String numberOfPersonsInjured, String numberOfPersonsKilled, String numberOfPedestriansInjured,
			String numberOfPedestriansKilled, String numberOfCyclistInjured, String numberOfCyclistKilled,
			String numberOfMotoristInjured, String numberOfMotoristKilled, String collisionId) {
		super();
		this.crashYear = crashYear;
		this.crashMonth = crashMonth;
		this.crashDay = crashDay;
		this.latitude = latitude;
		this.longitude = longitude;
		this.numberOfPersonsInjured = numberOfPersonsInjured;
		this.numberOfPersonsKilled = numberOfPersonsKilled;
		this.numberOfPedestriansInjured = numberOfPedestriansInjured;
		this.numberOfPedestriansKilled = numberOfPedestriansKilled;
		this.numberOfCyclistInjured = numberOfCyclistInjured;
		this.numberOfCyclistKilled = numberOfCyclistKilled;
		this.numberOfMotoristInjured = numberOfMotoristInjured;
		this.numberOfMotoristKilled = numberOfMotoristKilled;
		this.collisionId = collisionId;
	}

	@Override
	public String toString() {
		return "CrashDO [crashYear=" + crashYear + ", crashMonth=" + crashMonth + ", crashDay=" + crashDay
				+ ", latitude=" + latitude + ", longitude=" + longitude + ", numberOfPersonsInjured="
				+ numberOfPersonsInjured + ", numberOfPersonsKilled=" + numberOfPersonsKilled
				+ ", numberOfPedestriansInjured=" + numberOfPedestriansInjured + ", numberOfPedestriansKilled="
				+ numberOfPedestriansKilled + ", numberOfCyclistInjured=" + numberOfCyclistInjured
				+ ", numberOfCyclistKilled=" + numberOfCyclistKilled + ", numberOfMotoristInjured="
				+ numberOfMotoristInjured + ", numberOfMotoristKilled=" + numberOfMotoristKilled + ", collisionId="
				+ collisionId + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((collisionId == null) ? 0 : collisionId.hashCode());
		result = prime * result + ((crashDay == null) ? 0 : crashDay.hashCode());
		result = prime * result + ((crashMonth == null) ? 0 : crashMonth.hashCode());
		result = prime * result + ((crashYear == null) ? 0 : crashYear.hashCode());
		result = prime * result + ((latitude == null) ? 0 : latitude.hashCode());
		result = prime * result + ((longitude == null) ? 0 : longitude.hashCode());
		result = prime * result + ((numberOfCyclistInjured == null) ? 0 : numberOfCyclistInjured.hashCode());
		result = prime * result + ((numberOfCyclistKilled == null) ? 0 : numberOfCyclistKilled.hashCode());
		result = prime * result + ((numberOfMotoristInjured == null) ? 0 : numberOfMotoristInjured.hashCode());
		result = prime * result + ((numberOfMotoristKilled == null) ? 0 : numberOfMotoristKilled.hashCode());
		result = prime * result + ((numberOfPedestriansInjured == null) ? 0 : numberOfPedestriansInjured.hashCode());
		result = prime * result + ((numberOfPedestriansKilled == null) ? 0 : numberOfPedestriansKilled.hashCode());
		result = prime * result + ((numberOfPersonsInjured == null) ? 0 : numberOfPersonsInjured.hashCode());
		result = prime * result + ((numberOfPersonsKilled == null) ? 0 : numberOfPersonsKilled.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		CrashDO other = (CrashDO) obj;
		if (collisionId == null) {
			if (other.collisionId != null)
				return false;
		} else if (!collisionId.equals(other.collisionId))
			return false;
		if (crashDay == null) {
			if (other.crashDay != null)
				return false;
		} else if (!crashDay.equals(other.crashDay))
			return false;
		if (crashMonth == null) {
			if (other.crashMonth != null)
				return false;
		} else if (!crashMonth.equals(other.crashMonth))
			return false;
		if (crashYear == null) {
			if (other.crashYear != null)
				return false;
		} else if (!crashYear.equals(other.crashYear))
			return false;
		if (latitude == null) {
			if (other.latitude != null)
				return false;
		} else if (!latitude.equals(other.latitude))
			return false;
		if (longitude == null) {
			if (other.longitude != null)
				return false;
		} else if (!longitude.equals(other.longitude))
			return false;
		if (numberOfCyclistInjured == null) {
			if (other.numberOfCyclistInjured != null)
				return false;
		} else if (!numberOfCyclistInjured.equals(other.numberOfCyclistInjured))
			return false;
		if (numberOfCyclistKilled == null) {
			if (other.numberOfCyclistKilled != null)
				return false;
		} else if (!numberOfCyclistKilled.equals(other.numberOfCyclistKilled))
			return false;
		if (numberOfMotoristInjured == null) {
			if (other.numberOfMotoristInjured != null)
				return false;
		} else if (!numberOfMotoristInjured.equals(other.numberOfMotoristInjured))
			return false;
		if (numberOfMotoristKilled == null) {
			if (other.numberOfMotoristKilled != null)
				return false;
		} else if (!numberOfMotoristKilled.equals(other.numberOfMotoristKilled))
			return false;
		if (numberOfPedestriansInjured == null) {
			if (other.numberOfPedestriansInjured != null)
				return false;
		} else if (!numberOfPedestriansInjured.equals(other.numberOfPedestriansInjured))
			return false;
		if (numberOfPedestriansKilled == null) {
			if (other.numberOfPedestriansKilled != null)
				return false;
		} else if (!numberOfPedestriansKilled.equals(other.numberOfPedestriansKilled))
			return false;
		if (numberOfPersonsInjured == null) {
			if (other.numberOfPersonsInjured != null)
				return false;
		} else if (!numberOfPersonsInjured.equals(other.numberOfPersonsInjured))
			return false;
		if (numberOfPersonsKilled == null) {
			if (other.numberOfPersonsKilled != null)
				return false;
		} else if (!numberOfPersonsKilled.equals(other.numberOfPersonsKilled))
			return false;
		return true;
	}

	/**
	 * @return the crashYear
	 */
	public String getCrashYear() {
		return crashYear;
	}

	/**
	 * @param crashYear the crashYear to set
	 */
	public void setCrashYear(String crashYear) {
		this.crashYear = crashYear;
	}

	/**
	 * @return the crashMonth
	 */
	public String getCrashMonth() {
		return crashMonth;
	}

	/**
	 * @param crashMonth the crashMonth to set
	 */
	public void setCrashMonth(String crashMonth) {
		this.crashMonth = crashMonth;
	}

	/**
	 * @return the crashDay
	 */
	public String getCrashDay() {
		return crashDay;
	}

	/**
	 * @param crashDay the crashDay to set
	 */
	public void setCrashDay(String crashDay) {
		this.crashDay = crashDay;
	}

	/**
	 * @return the latitude
	 */
	public String getLatitude() {
		return latitude;
	}

	/**
	 * @param latitude the latitude to set
	 */
	public void setLatitude(String latitude) {
		this.latitude = latitude;
	}

	/**
	 * @return the longitude
	 */
	public String getLongitude() {
		return longitude;
	}

	/**
	 * @param longitude the longitude to set
	 */
	public void setLongitude(String longitude) {
		this.longitude = longitude;
	}

	/**
	 * @return the numberOfPersonsInjured
	 */
	public String getNumberOfPersonsInjured() {
		return numberOfPersonsInjured;
	}

	/**
	 * @param numberOfPersonsInjured the numberOfPersonsInjured to set
	 */
	public void setNumberOfPersonsInjured(String numberOfPersonsInjured) {
		this.numberOfPersonsInjured = numberOfPersonsInjured;
	}

	/**
	 * @return the numberOfPersonsKilled
	 */
	public String getNumberOfPersonsKilled() {
		return numberOfPersonsKilled;
	}

	/**
	 * @param numberOfPersonsKilled the numberOfPersonsKilled to set
	 */
	public void setNumberOfPersonsKilled(String numberOfPersonsKilled) {
		this.numberOfPersonsKilled = numberOfPersonsKilled;
	}

	/**
	 * @return the numberOfPedestriansInjured
	 */
	public String getNumberOfPedestriansInjured() {
		return numberOfPedestriansInjured;
	}

	/**
	 * @param numberOfPedestriansInjured the numberOfPedestriansInjured to set
	 */
	public void setNumberOfPedestriansInjured(String numberOfPedestriansInjured) {
		this.numberOfPedestriansInjured = numberOfPedestriansInjured;
	}

	/**
	 * @return the numberOfPedestriansKilled
	 */
	public String getNumberOfPedestriansKilled() {
		return numberOfPedestriansKilled;
	}

	/**
	 * @param numberOfPedestriansKilled the numberOfPedestriansKilled to set
	 */
	public void setNumberOfPedestriansKilled(String numberOfPedestriansKilled) {
		this.numberOfPedestriansKilled = numberOfPedestriansKilled;
	}

	/**
	 * @return the numberOfCyclistInjured
	 */
	public String getNumberOfCyclistInjured() {
		return numberOfCyclistInjured;
	}

	/**
	 * @param numberOfCyclistInjured the numberOfCyclistInjured to set
	 */
	public void setNumberOfCyclistInjured(String numberOfCyclistInjured) {
		this.numberOfCyclistInjured = numberOfCyclistInjured;
	}

	/**
	 * @return the numberOfCyclistKilled
	 */
	public String getNumberOfCyclistKilled() {
		return numberOfCyclistKilled;
	}

	/**
	 * @param numberOfCyclistKilled the numberOfCyclistKilled to set
	 */
	public void setNumberOfCyclistKilled(String numberOfCyclistKilled) {
		this.numberOfCyclistKilled = numberOfCyclistKilled;
	}

	/**
	 * @return the numberOfMotoristInjured
	 */
	public String getNumberOfMotoristInjured() {
		return numberOfMotoristInjured;
	}

	/**
	 * @param numberOfMotoristInjured the numberOfMotoristInjured to set
	 */
	public void setNumberOfMotoristInjured(String numberOfMotoristInjured) {
		this.numberOfMotoristInjured = numberOfMotoristInjured;
	}

	/**
	 * @return the numberOfMotoristKilled
	 */
	public String getNumberOfMotoristKilled() {
		return numberOfMotoristKilled;
	}

	/**
	 * @param numberOfMotoristKilled the numberOfMotoristKilled to set
	 */
	public void setNumberOfMotoristKilled(String numberOfMotoristKilled) {
		this.numberOfMotoristKilled = numberOfMotoristKilled;
	}

	/**
	 * @return the collisionId
	 */
	public String getCollisionId() {
		return collisionId;
	}

	/**
	 * @param collisionId the collisionId to set
	 */
	public void setCollisionId(String collisionId) {
		this.collisionId = collisionId;
	}
	
	
	
}
